<?php

namespace app\admin\command;

use other\ShopingConn;
use other\tongtu\ShipOrderId;
use think\console\Command;
use think\console\Input;
use think\console\Output;
use think\db\exception\DataNotFoundException;
use think\db\exception\ModelNotFoundException;
use think\Exception;
use think\exception\DbException;


/**
 * 通途
 */
class Tt extends Command
{
    protected function configure()
    {
        $this->setName('tt')
            ->addArgument('param_one')
            ->addArgument('param_two');
    }


    /**
     * 执行
     * @param Input $input
     * @param Output $output
     * @return void
     */
    protected function execute(Input $input, Output $output)
    {
        $param_one = $input->getArgument('param_one');
        $param_two = $input->getArgument('param_two');

        ShopingConn::getOrderInfo(768);
        $handel = new ShipOrderId();
        try {
            $handel->do();
        } catch (DataNotFoundException|ModelNotFoundException|DbException|Exception $e) {
            ShopingConn::wechatRobot(__METHOD__.$e->getMessage());
        }
    }
}
